//
//  CoreDataScene.m
//  WidgetTest
//
//  Created by 李明明 on 15/10/28.
//  Copyright © 2015年 李明明. All rights reserved.
//

#import "CoreDataScene.h"
#import "People+CoreDataProperties.h"
#import "Animal+CoreDataProperties.h"
@interface CoreDataScene ()

@end

@implementation CoreDataScene

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)insert:(id)sender
{
    [[People sharePeople] insert:@{@"name":@"徐策", @"age":@24, @"sex":@"boy"}];
}
- (IBAction)deletes:(id)sender
{
    [[People sharePeople] deleteWith:@"徐策"];
}
- (IBAction)selects:(id)sender
{
    [[People sharePeople] selectField:@"name" currentValue:@"xiaoming" aNewValue:@"徐策"];
    [[People sharePeople] addFeedObject:[Animal shareAnimal]];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
